const {resolve} = require('path')

/* 
HMR
    样式文件:可以实现,依赖于style-loader
    js文件:默认不支持,可修改js代码实现;非入口文件能实现
    html文件:默认不能


*/

module.exports = {
    // html 启用热替换
    entery:['./src/indes.js','./index.html'],
    optput:{
        filename:'js/built.js',
        path:resolve(__dirname,'public'),
    },
    mode:{
        rules:[

        ]
    },
    plugins:[],
    mode:'development',
    devServer:{
        contentBase:resolve(__dirname,'dist'),
        compress:false,
        open:true,
        port:8000,
        hot:true,
    }
}